Skip to content

Conversation

@indykoning
Copy link
Contributor

This improves compatibility with frameworks like Vue where Html gets replaced once it has booted.

Why do we need this?
When placing the nocache tag within Vue's scope (usually id="app") our nocache tags aren't actually being replaced anymore.

Why does this happen?
Vue Replaces the html with it's computed html from the virtualdom when booting.
This means the references to the elements we've saved are stale.
Now we update our mapping after the fetch has completed so we can correctly replace our data

This improves compatibility with frameworks like Vue where Html gets replaced once it has booted
@indykoning indykoning changed the title Update nocache map on response [5.x] Update nocache map on response Apr 2, 2025
Copy link
Member

@jasonvarga jasonvarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extracted a method to avoid duplicated code, but otherwise great. Thanks!

@jasonvarga jasonvarga merged commit 573d366 into statamic:5.x Apr 23, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants